package com.gcspring.h2db.repo;

import com.gcspring.h2db.entity.Websites;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface WebsitesRepository extends JpaRepository<Websites, Long>, JpaSpecificationExecutor<Websites> {

    @Query("select c from #{#entityName} c where c.name like %:key%")
    Page<Websites> search(String key, Pageable pageable);
}